#!/usr/bin/node

const http=require("http"),
      log=console.log,
      fs=require('fs');

  http.createServer((req,res)=>{
    //error do
    log(`${req.method}  ${req.url}  HTTP/${req.httpVersion}`);
    log(req.headers);
    log();
    log(process.pid);

    let fileName=__dirname+req.url;
    fs.createReadStream(fileName).pipe(res);


}).listen(8080)
